﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Parentmasterpage.master" CodeBehind="AddCruises.aspx.vb" Inherits="WebApplicationcruises.AddCruises" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style12
        {
            text-align: left;
        }
        .style17
        {
            width: 681px;
            text-align: left;
        }
        .style18
        {
            width: 681px;
            text-align: left;
            height: 32px;
        }
        .style19
        {
            text-align: left;
            height: 32px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style11">
        <tr>
            <td style="border: thin solid #589BB6">
                <b>Add Cruises&gt;&gt; step 1 information</b><asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionStringDB %>" 
        DeleteCommand="DELETE FROM [CruisesTable] WHERE [CId] = ?" 
        InsertCommand="INSERT INTO [CruisesTable] ( [CTitle], [CDate], [CTime], [CSeason], [CCountry], [CCity], [CPlace], [CCoste], [CDescription], [CThumbnail], [Cuserid]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" 
        ProviderName="<%$ ConnectionStrings:ConnectionStringDB.ProviderName %>" 
        SelectCommand="SELECT [CId], [CTitle], [CDate], [CTime], [CSeason], [CCountry], [CCity], [CPlace], [CCoste], [CDescription], [CThumbnail], [Cuserid], [CCreatedate] FROM [CruisesTable]" 
        
        
        UpdateCommand="UPDATE [CruisesTable] SET [CTitle] = ?, [CDate] = ?, [CTime] = ?, [CSeason] = ?, [CCountry] = ?, [CCity] = ?, [CPlace] = ?, [CCoste] = ?, [CDescription] = ?, [CThumbnail] = ?, [Cuserid] = ?, [CCreatedate] = ? WHERE [CId] = ?">
        <DeleteParameters>
            <asp:Parameter Name="CId" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="CTitle" Type="String" />
            <asp:Parameter Name="CDate" Type="String" />
            <asp:Parameter Name="CTime" Type="String" />
            <asp:Parameter Name="CSeason" Type="String" />
            <asp:Parameter Name="CCountry" Type="String" />
            <asp:Parameter Name="CCity" Type="String" />
            <asp:Parameter Name="CPlace" Type="String" />
            <asp:Parameter Name="CCoste" Type="Decimal" />
            <asp:Parameter Name="CDescription" Type="String" />
            <asp:SessionParameter DefaultValue="" Name="CThumbnail" 
                SessionField="fileupload" Type="String" />
            <asp:SessionParameter Name="Cuserid" SessionField="userid" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="CTitle" Type="String" />
            <asp:Parameter Name="CDate" Type="DateTime" />
            <asp:Parameter Name="CTime" Type="DateTime" />
            <asp:Parameter Name="CSeason" Type="String" />
            <asp:Parameter Name="CCountry" Type="String" />
            <asp:Parameter Name="CCity" Type="String" />
            <asp:Parameter Name="CPlace" Type="String" />
            <asp:Parameter Name="CCoste" Type="Decimal" />
            <asp:Parameter Name="CDescription" Type="String" />
            <asp:Parameter Name="CThumbnail" Type="String" />
            <asp:Parameter Name="Cuserid" Type="Int32" />
            <asp:Parameter Name="CCreatedate" Type="DateTime" />
            <asp:Parameter Name="CId" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="border: thin solid #589BB6">
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="CId" 
        DataSourceID="SqlDataSource1" DefaultMode="Insert" Width="823px">
        <EditItemTemplate>
            CTitle:
            <asp:TextBox ID="CTitleTextBox" runat="server" Text='<%# Bind("CTitle") %>' />
            <br />
            CDate:
            <asp:TextBox ID="CDateTextBox" runat="server" Text='<%# Bind("CDate") %>' />
            <br />
            CTime:
            <asp:TextBox ID="CTimeTextBox" runat="server" Text='<%# Bind("CTime") %>' />
            <br />
            CSeason:
            <asp:TextBox ID="CSeasonTextBox" runat="server" Text='<%# Bind("CSeason") %>' />
            <br />
            CCountry:
            <asp:TextBox ID="CCountryTextBox" runat="server" 
                Text='<%# Bind("CCountry") %>' />
            <br />
            CCity:
            <asp:TextBox ID="CCityTextBox" runat="server" Text='<%# Bind("CCity") %>' />
            <br />
            CPlace:
            <asp:TextBox ID="CPlaceTextBox" runat="server" Text='<%# Bind("CPlace") %>' />
            <br />
            CCoste:
            <asp:TextBox ID="CCosteTextBox" runat="server" Text='<%# Bind("CCoste") %>' />
            <br />
            CDescription:
            <asp:TextBox ID="CDescriptionTextBox" runat="server" 
                Text='<%# Bind("CDescription") %>' />
            <br />
            CThumbnail:
            <asp:TextBox ID="CThumbnailTextBox" runat="server" 
                Text='<%# Bind("CThumbnail") %>' />
            <br />
            Cuserid:
            <asp:TextBox ID="CuseridTextBox" runat="server" Text='<%# Bind("Cuserid") %>' />
            <br />
            CId:
            <asp:Label ID="CIdLabel1" runat="server" Text='<%# Eval("CId") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            <table class="style11" style="width: 100%">
                <tr>
                    <td class="style17">
                        What would you like to name your cruise?
                    </td>
                    <td class="style12">
                        <asp:TextBox ID="CTitleTextBox" runat="server" Text='<%# Bind("CTitle") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        When have you been to your cruise?
                    </td>
                    <td class="style12">
                        <asp:TextBox ID="CDateTextBox" runat="server" Text='<%# Bind("CDate") %>' />
                        
                        
                        <asp:CalendarExtender ID="CDateTextBox_CalendarExtender" runat="server" 
                            TargetControlID="CDateTextBox">
                        </asp:CalendarExtender>
                        
                        
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        What the time was which you started your cruise ..
                    </td>
                    <td class="style12">
                        <asp:TextBox ID="CTimeTextBox" runat="server" Text='<%# Bind("CTime") %>' />
                        <asp:MaskedEditExtender ID="CTimeTextBox_MaskedEditExtender" runat="server" 
                            TargetControlID="CTimeTextBox" Mask="99:99"  
          MaskType="Time" >
                        </asp:MaskedEditExtender>
                    
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        In which season your cruise was ..
                    </td>
                    <td class="style12">
                        <asp:TextBox ID="CSeasonTextBox" runat="server" Text='<%# Bind("CSeason") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        From which country you started your cruise ..
                    </td>
                    <td class="style12">
                        <asp:TextBox ID="CCountryTextBox" runat="server" 
                            Text='<%# Bind("CCountry") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style18">
                        From Which city ..
                    </td>
                    <td class="style19">
                        <asp:TextBox ID="CCityTextBox" runat="server" Text='<%# Bind("CCity") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        What is the name of the beatiful place which you have been to?</td>
                    <td class="style12">
                        <asp:TextBox ID="CPlaceTextBox" runat="server" Text='<%# Bind("CPlace") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        How much this cruise cost you?</td>
                    <td class="style12">
                        <asp:TextBox ID="CCosteTextBox" runat="server" Text='<%# Bind("CCoste") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        Tell us more about your cruise ..</td>
                    <td class="style12">
                        <asp:TextBox ID="CDescriptionTextBox" runat="server" 
                            Text='<%# Bind("CDescription") %>' Height="166px" TextMode="MultiLine" 
                            Width="393px" />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        Add a picture to describe your cruise
                    </td>
                    <td class="style12">
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td style="text-align: left">
                        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                            CommandName="Insert" Text="Add" />
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </InsertItemTemplate>
        <ItemTemplate>
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                CommandName="Edit" Text="Edit" />
            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                CommandName="Delete" Text="Delete" />
            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                CommandName="New" Text="New" />
            <br />
            <table class="style11">
                <tr>
                    <td class="style12">
                        Title:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CTitleLabel" runat="server" Text='<%# Bind("CTitle") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CDate:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CDateLabel" runat="server" Text='<%# Bind("CDate") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CTime:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CTimeLabel" runat="server" Text='<%# Bind("CTime") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CSeason:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CSeasonLabel" runat="server" Text='<%# Bind("CSeason") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CCountry:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CCountryLabel" runat="server" Text='<%# Bind("CCountry") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CCity:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CCityLabel" runat="server" Text='<%# Bind("CCity") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CPlace:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CPlaceLabel" runat="server" Text='<%# Bind("CPlace") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CCoste:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CCosteLabel" runat="server" Text='<%# Bind("CCoste") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CDescription:</td>
                    <td class="style12">
                        <asp:Label ID="CDescriptionLabel" runat="server" 
                            Text='<%# Bind("CDescription") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        CThumbnail:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CThumbnailLabel" runat="server" 
                            Text='<%# Bind("CThumbnail") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style12">
                        Cuserid:
                    </td>
                    <td class="style12">
                        <asp:Label ID="CuseridLabel" runat="server" Text='<%# Bind("Cuserid") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        CId:
                    </td>
                    <td style="text-align: left">
                        <asp:Label ID="CIdLabel" runat="server" Text='<%# Eval("CId") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:FormView>
            </td>
        </tr>
    </table>
</asp:Content>
